package com.reggie.common.enums;

import lombok.Getter;

/**
 * 响应状态码
 *
 * @author yth
 * @since 2023-02-04-15:44
 */
@Getter
public enum ResponseCode {

    OK("00000", "一切ok"),

    CLIENT_ERROR("A0001", "用户端错误"),
//    CLIENT_REGISTER_ERROR("A0100", "用户注册错误"),
//    CLIENT_LOGIN_ERROR("A0200", "用户登陆异常"),
//    CLIENT_AUTHORITY_ERROR("A0300", "访问权限异常"),
//    CLIENT_REQUEST_PARAMS_ERROR("A0400", "用户请求参数错误"),
//    CLIENT_REQUEST_SERVICE_ERROR("A0500", "用户请求服务异常"),
//    CLIENT_RESOURCE_ERROR("A0600", "用户资源异常"),
//    CLIENT_UPLOAD_ERROR("A0700", "用户上传异常"),
//    CLIENT_VERSION_ERROR("A0800", "用户当前版本异常"),
//    CLIENT_PRIVACY_ERROR("A0900", "用户隐私未授权"),
//    CLIENT_DEVICE_ERROR("A1000", "用户设备异常"),

    SYSTEM_ERROR("B0001", "系统错误"),
//    SYSTEM_TIMEOUT_ERROR("B0100", "系统执行超时"),
//    SYSTEM_DISASTER_TOLERANCE_ERROR("B0200", "系统容灾功能被触发"),
//    SYSTEM_RESOURCE_ERROR("B0300", "系统资源异常"),

    SERVER_ERROR("C0001", "调用第三方服务异常"),
//    SERVER_MIDDLEWARE_ERROR("C0100", "中间件服务出错"),
//    SERVER_TIMEOUT_ERROR("C0200", "第三方系统执行超时"),
//    SERVER_DATABASE_ERROR("C0300", "数据库服务出错"),
//    SERVER_DISASTER_TOLERANCE_ERROR("C0400", "第三方容灾系统被触发"),
//    SERVER_NOTIFY_ERROR("C0500", "通知服务出错")

    ;

    private final String code;
    private final String description;

    ResponseCode(String code, String description) {
        this.code = code;
        this.description = description;
    }

    @Override
    public String toString() {
        return "ResponseCode{" +
                "code='" + code + '\'' +
                ", description='" + description + '\'' +
                "} " + super.toString();
    }


}
